package com.xbongbong.paas.pojo.dto;

import lombok.Getter;
import lombok.Setter;
import lombok.ToString;

import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.util.List;

/**
 * PAAS数据初始化
 * 创建时间： 2018/9/27 14:38
 * 修改时间： 2018/9/27 14:38 梁鲁江
 *
 * @author 梁鲁江
 */
@Getter
@Setter
@ToString
public class PaasFormDataEsMappingDTO implements Serializable {
    private static final long serialVersionUID = 3303094368859356514L;
    /**
     * 验证码
     */
    @NotEmpty(message = "{dto.msg.paasFormDataEsInit.xbbCode.NotEmpty}")
    private String xbbCode;
    /**
     * paas和saas的区分标记
     *  @see  com.xbongbong.pro.enums.SaasMarkEnum
     */
    @NotNull(message="{dto.msg.paasFormDataEsInit.saasMark.NotNull}")
    private Integer saasMark;
    /**
     * saas业务类型,当saasMark为saas的时候不为空
     * @see  com.xbongbong.saas.enums.RedundantTemplateTypeEnum
     */
    private Integer businessType;

    private List<Integer> businessTypeList;

    /**
     * 索引版本号，如果新建索引需要用到别名，则传入该值，如v1、v2。否则该值一定要传空或不传
     */
    private String indexVersion;

    private Integer special;

    public PaasFormDataEsMappingDTO() {
    }

    public PaasFormDataEsMappingDTO(@NotNull(message = "saasMark不能为空") Integer saasMark, Integer businessType) {
        this.saasMark = saasMark;
        this.businessType = businessType;
    }
}
